Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding local node version >8.9 to <12.0.0 to avoid breaking build by fibers 3.1.1 #5102

Closed

Conversation

renebaudisch
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

npm i fails with node >=12 because fibers 3.1.1 doesn't support it. This will install a local node version that fits fibers on npm i.

Copy link
Collaborator

@jaiminpanchal27 jaiminpanchal27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do this to make it work with Node 12

  • fibers is used by webdriver mocha framework and we should update that node module to make it work with Node 12.
  • Also installing node as devDependency is not a good idea. There are some open issues which will create confusion and errors for developers. https://github.com/aredridel/node-bin-gen/issues e.g npm ci does not work properly

We are working on updating the webdriver to latest version. I think it will fix the problem as well

@renebaudisch
Copy link
Contributor Author

@jaiminpanchal27 sorry, but then go on and do it!
A not known error like "fibers is not working" also is just confusing and doesn't help.

The problem is there since almost a year, regarding Issue #3878

and over month no one was reacting!
It made me think you will never fix this at all and cannot update fibers/moha...

But maybe this will help finally
#5128
But I'm familiar with your build, I do not know if you can update mocha without problems.

But every build process at the moment is a pain when Node 12 is installed!

@renebaudisch
Copy link
Contributor Author

Here
#4820
you told me you will not update to node 12 because it will break, now you will update after I found a soluztion that doesn't need an update.

However please finally fix this problem!

@jaiminpanchal27
Copy link
Collaborator

@renebaudisch My colleague is on to this one and will put up a PR in couple of days to fix this one with other webdriver changes.

@stale
Copy link

stale bot commented May 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 20, 2020
@renebaudisch
Copy link
Contributor Author

renebaudisch commented May 26, 2020

Using v3.20 I still get a n error on npm i from fibers 3.1.1.

Using
gulp build --modules=prebidAdaptors.json
afterwards succeeds, but is it operating fine this way?

Maybe you could have a look once more?

45375 warn notsup Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"12.13.0","npm":"6.12.0"})
45376 warn notsup Not compatible with your version of node/npm: [email protected]
45377 verbose notsup Not compatible with your version of node/npm: [email protected]
45377 verbose notsup Required: {"node":"<8.10.0"}
45377 verbose notsup Actual: {"npm":"6.12.0","node":"12.13.0"}
45378 warn [email protected] requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
45379 verbose stack Error: [email protected] install: node build.js || nodejs build.js
45379 verbose stack spawn ENOENT
45379 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
45379 verbose stack at ChildProcess.emit (events.js:210:5)
45379 verbose stack at maybeClose (internal/child_process.js:1021:16)
45379 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
45380 verbose pkgid [email protected]
45381 verbose cwd /Users/rbaudisc/WebstormProjects/adsolutions-adlib/node_modules/prebid.js
45382 verbose Darwin 18.7.0
45383 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
45384 verbose node v12.13.0
45385 verbose npm v6.12.0
45386 error code ELIFECYCLE
45387 error syscall spawn
45388 error file sh
45389 error errno ENOENT
45390 error [email protected] install: node build.js || nodejs build.js
45390 error spawn ENOENT
45391 error Failed at the [email protected] install script.
45391 error This is probably not a problem with npm. There is likely additional logging output above.
45392 verbose exit [ 1, true ]

@stale stale bot removed the stale label May 26, 2020
@stale
Copy link

stale bot commented Jun 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 9, 2020
@stale stale bot closed this Jun 17, 2020
@maplefu0601
Copy link

I'm using node v12.16.1. There's no issue at all when running in local with meteor run --production, but when deploying to AWS using mup deploy with abernix/meteord:node-12.16.1-base, the deployment fails. It has the following errors:

Prepare Bundle: FAILED

      ------------------------------------STDERR------------------------------------
      The command '/bin/sh -c cd  /built_app/programs/server &&     npm install --unsafe-perm' returned a non-zero code: 1

      ------------------------------------STDOUT------------------------------------
      ot a member of 'uni'
    target->Set(uni::NewLatin1Symbol(isolate, "Fiber"), fn);
                ^~~
../src/fibers.cc: At global scope:
../src/fibers.cc:901:11: error: variable or field 'init' declared void
 void init(Handle<Object> target) {
           ^~~~~~
../src/fibers.cc:901:11: error: 'Handle' was not declared in this scope
../src/fibers.cc:901:24: error: expected primary-expression before '>' token
 void init(Handle<Object> target) {
                        ^
../src/fibers.cc:901:26: error: 'target' was not declared in this scope
 void init(Handle<Object> target) {
                          ^~~~~~
../src/fibers.cc: In instantiation of 'void uni::Return(v8::Persistent<T, v8::NonCopyablePersistentTraits<T> >&, uni::GetterCallbackInfo) [with T = v8::Object; uni::GetterCallbackInfo = v8::PropertyCallbackInfo<v8::Value>]':
../src/fibers.cc:814:45:   required from here
../src/fibers.cc:185:3: warning: 'void v8::ReturnValue<T>::Set(const v8::Persistent<S>&) [with S = v8::Object; T = v8::Value]' is deprecated: Use Global<> instead [-Wdeprecated-declarations]
   info.GetReturnValue().Set(handle);
   ^~~~
In file included from /root/.cache/node-gyp/12.16.1/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.cache/node-gyp/12.16.1/include/node/v8.h:10424:6: note: declared here
 void ReturnValue<T>::Set(const Persistent<S>& handle) {
      ^~~~~~~~~~~~~~
fibers.target.mk:120: recipe for target 'Release/obj.target/fibers/src/fibers.o' failed
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
make: Leaving directory '/built_app/programs/server/node_modules/fibers/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-1029-aws
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /built_app/programs/server/node_modules/fibers
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'` 
Alpine users please run: `sudo apk add python make g++`
sh: 1: nodejs: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-13T00_06_48_966Z-debug.log

@renebaudisch
Copy link
Contributor Author

That's why I favored >8.9 to <12.0.0 as fibers 3.1.1 isn't compatible with node >= 12.0.0 and so also fibers used in webdriver module has to be updated and using node < 12.0.0 haven't had that dependencies.
But this has been marked as fixed by upgrading prebid to be compatible to node >= 12, isn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants